<?php
namespace app\api\controller;
use think\Controller;
class Base extends controller
{
    protected function _initialize()
    {    
    	header('content-type:text/html;charset=utf-8');
    	header('Access-Control-Allow-Origin:*');
    	header("Access-Control-Allow-Headers:Origin,X-Requested-With,Content-Type,Accept");
    	header('Access-Control-Allow-Methods:GET,POST,PUT');
    	ksort($_POST);
    	ksort($_GET);
    }  

    //生成token操作
    public function create_token(){
    	$token = md5(mt_rand(11111,99999).time());
    	return $token;
    } 
}